float fNearClipPlane;
float fFarClipPlane;
float4x4 matViewProjection;

struct VS_INPUT 
{
   float4 Position : POSITION0;
   
};

struct VS_OUTPUT 
{
   float4 Position : POSITION0;
   float2 Pos :      TEXCOORD1;
   
};

VS_OUTPUT vs_main( VS_INPUT Input )
{
   VS_OUTPUT Output;
   
   Output.Position = mul( Input.Position, matViewProjection );
   float4 test = mul( Input.Position, matViewProjection );
   Output.Pos.x = test.z;
   Output.Pos.y = 0;
   
   return( Output );
   
}





struct PS_INPUT
{
   float4 Position : POSITION0;
   float2 Pos :      TEXCOORD1;
};



float4 ps_main(PS_INPUT input) : COLOR0
{
   return (1 - (input.Pos.x / (fFarClipPlane - fNearClipPlane)) * 3);  
}

technique Schachbrett_Shader
{
   pass Pass1
   {
	  VertexShader = compile vs_2_0 vs_main();
      PixelShader = compile ps_2_0 ps_main();
   }
} 
